/**
 * @param {Object} cate 分类
 * @param {Object} goods 商品
 */
export function computedData(cate, goods) {
	let list = cate
	for (var i = 0; i < list.length; i++) {
		list[i].cateNum = 0
		list[i].children = []
		for (var j = 0; j < goods.length; j++) {
			goods[j].num = 0
			if (list[i].id == goods[j].pid) {
				list[i].children.push(goods[j])
			}
		}
	}
	return list
}